import { id, pa } from 'element-plus/es/locale';
import httpRequest from '../../utils/request'
import modules from '../modules'
const defaultRoute = 'Shopfloor_ProductionLine'
const controllerName = 'ProductionLine'

export interface ProductionLineParam {
  id: string;
  PageSize: number;
  PageIndex: number;
}


// 获取产线列表
export function ApiGetShopfloor_ProductionLinePageListAsync(param: ProductionLineParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Get${defaultRoute}PageList`,
    method: "Post",
    data: param,
  });
}

// 根据产线Id获取产线工作站列表
export function ApiGetShopfloor_ProductionLineByIdWorkStationListAsync(param: string) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Get${defaultRoute}ByIdWorkStationList`,
    method: "Post",
    data: {
      Id:param
    },
  });
}

// 批量删除产线
export function ApiDeletionShopfloor_ProductionLineAsync(param: ProductionLineParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Deletion${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加产线
export function ApiCreateShopfloor_ProductionLineAsync(param: ProductionLineParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Create${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 更新产线
export function ApiUpdateShopfloor_ProductionLineAsync(param: ProductionLineParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Update${defaultRoute}`,
    method: "Post",
    data: param,
  });
}